import minappSdk from "minapp-sdk"
const BaaS = minappSdk

let feedbackTable = new BaaS.TableObject("feedback")

export async function addFeedbackRecord(email: string, feedback: string) {
  let row = feedbackTable.create()
  try {
    await row.set({ email, feedback }).save()
    return { code: 0, message: "提交成功" }
  } catch (error: any) {
    return { code: 1, message: `反馈失败,${error.message}` }
  }
}
